function getRunList(){
  // debugger;
  var isSearch = $("#runH2").attr("value");
  if(isSearch == "false"){
    $("#runH2").attr("value","true");
    return;
  }else
  $("#runH2").attr("value","false");
  layui.use('table', function(){
    var table = layui.table;
    var util = layui.util;
    var opid = getId();
    table.render({
      elem: '#repair_table'
      ,url:head+'/manager/searchOtherList'
      ,method:'post'
      ,where:{
        operationId:opid
        ,type:3
        ,size:0
      }
      ,request:{
        pageName: 'pageNum'
        ,limitName: 'pageSize'
      }
      ,toolbar: '#toolbarDemo'
      ,title: '用户数据表'
      ,cols: [[ 
        {field:'applicantName', title:'申报人', width:'13%'}
        ,{field:'repairAddr', title:'报修地址', width:'10%'}
        ,{field:'addtime', title:'申报时间', width:'15%', templet:function(d){return util.toDateString(d.addtime*1,"yyyy-MM-dd HH:mm")}}
        ,{field:'questionMsg', title:'信息',width:'30%', maxlength:'20'}
        ,{field:'mName', title:'操作管理员',width:'13%'}
        ,{field:'wName', title:'维修师傅',width:'13%'}
        ,{field:'state', title:'状态',width:'10%',templet:function(d){return statedic(d)}}
        ,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:'10%'}
      ]]
      ,page: true
    });
    

    //监听行工具事件
    table.on('tool(test)', function(obj){
      var data = obj.data;
      //console.log(obj)
     if(obj.event === 'detail'){
        // alert(data.id);
        // alert(data.studentiden);
        //弹出层
        layer.open({
          type: 2, 
          title:'详细信息',
          area: ['84%','86%'],
          offset:['5%','8%'],
          scrollbar: true,
          content: 'repair_history_item_other.html?id='+data.id+'&type='+3,//这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
          success: function(layero,index){
          
          }
        }); 
  
      }
    });
  });
}
function getHList(){
  // debugger;
  var isSearch = $("#hisH2").attr("value");
  if(isSearch == "false"){
    $("#hisH2").attr("value","true");
    return;
  }else
  $("#hisH2").attr("value","false");

  layui.use('table', function(){
    var table = layui.table;
    var util = layui.util;
    var opid = getId();
    table.render({
      elem: '#repair_his_table'
      ,url:head+'/manager/searchOtherList'
      ,method:'post'
      ,where:{
        operationId:opid
        ,type:0
        ,size:0
      }
      ,request:{
        pageName: 'pageNum'
        ,limitName: 'pageSize'
      }
      ,toolbar: '#toolbarDemo'
      ,title: '用户数据表'
      ,cols: [[ 
        {field:'applicantName', title:'申报人', width:'13%'}
        ,{field:'repairAddr', title:'报修地址', width:'10%'}
        ,{field:'addtime', title:'申报时间', width:'15%', templet:function(d){return util.toDateString(d.addtime*1,"yyyy-MM-dd HH:mm")}}
        ,{field:'questionMsg', title:'信息',width:'30%', maxlength:'20'}
        ,{field:'mName', title:'操作管理员',width:'13%'}
        ,{field:'wName', title:'维修师傅',width:'13%'}
        ,{field:'state', title:'状态',width:'10%',templet:function(d){return statedic(d)}}
        ,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:'10%'}
      ]]
      ,page: true
    });
    //监听行工具事件
    table.on('tool(test2)', function(obj){
      // debugger;
      var data = obj.data;
      //console.log(obj)
     if(obj.event === 'detail'){
        // alert(data.id);
        // alert(data.studentiden);
        //弹出层
        layer.open({
          type: 2, 
          title:'详细信息',
          area: ['84%','86%'],
          offset:['5%','8%'],
          scrollbar: true,
          content: 'repair_history_item_other.html?id='+data.id+'&type='+0,//这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
          success: function(layero,index){ 
          
          }
        }); 
  
      }
    });
  })
}



layui.use(['element', 'layer'], function(){
    var element = layui.element;
    var layer = layui.layer;
    
    //监听折叠
    element.on('collapse(test)', function(data){
      layer.msg('展开状态：'+ data.show);
    });
    getRunList();
    // getHList();
  });


  